package ml.kupin.common.vo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.io.Serializable;

/**
 * Created by 小柯(Allen Kerr) on 17.4.25 20:28.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class KindEditorFileUploadResult implements Serializable {
    /**
     * 文档 http://kindeditor.net/docs/upload.html
     成功时
     {
     "error" : 0,
     "url" : "http://www.example.com/path/to/file.ext"
     }
     失败时
     {
     "error" : 1,
     "message" : "错误信息"
     }
     */
    private int error;
    private String url;
    private String message;

    public KindEditorFileUploadResult(int error, String url) {
        this.error = error;
        this.url = url;
    }

    public KindEditorFileUploadResult(String message, int error) {
        this.message = message;
        this.error = error;
    }

    public KindEditorFileUploadResult() {
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getError() {
        return error;
    }

    public void setError(int error) {
        this.error = error;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
